<!doctype html>
<html>
  <head>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">
    <link rel="stylesheet" type="text/css" href="https://gitcdn.xyz/repo/angular/bower-material/v0.11.4/angular-material.css">
    <link rel="stylesheet" type="text/css" href="dist/angular-tooltips.css">
    <style media="screen">
      .dialogdemoBasicUsage #popupContainer {
        position: relative;
      }
      .dialogdemoBasicUsage .debt-be-gone {
        font-weight: bold;
        color: blue;
        text-decoration: underline;
      }
      .dialogdemoBasicUsage .footer {
        width: 100%;
        text-align: center;
        margin-left: 20px;
      }
      .dialogdemoBasicUsage .footer, .dialogdemoBasicUsage .footer > code {
        font-size: 0.8em;
        margin-top: 50px;
      }
    </style>
    <title>Angularjs Tooltips</title>
  </head>
  <body id="demo-container">
    <div ng-controller="AppCtrl" class="md-padding dialogdemoBasicUsage" id="popupContainer" ng-cloak="" ng-app="MyApp">
      <p class="inset" layout="row" layout-wrap="" layout-align="center center">
        Open a dialog over the app's content. Press escape or click outside to close the dialog and send focus back to the triggering button.
      </p>

      <div class="dialog-demo-content" layout="row" layout-wrap="" layout-align="center center">
        <span tooltips tooltip-template="Hello">
          <md-button class="md-primary md-raised" ng-click="showAlert($event)" style="width: 150px">
              Alert Dialog
          </md-button>
        </span>
      </div>

      <p class="footer">Note: The <b>Confirm</b> dialog does not use <code>$mdDialog.clickOutsideToClose(true)</code>.</p>

      <div ng-if="status">
        <br>
        <b layout="row" layout-align="center center" class="md-padding">
          {{status}}
        </b>
      </div>
    </div>

    <script type="text/javascript" src="bower_components/angular/angular.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-animate.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-route.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-aria.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular-messages.min.js"></script>
    <script type="text/javascript" src="https://gitcdn.xyz/repo/angular/bower-material/v0.11.4/angular-material.js"></script>
    <script type="text/javascript" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-114/assets-cache.js"></script>
    <script type="text/javascript" src="dist/angular-tooltips.js"></script>
    <script type="text/javascript">
    var app = angular.module('MyApp', ['ngMaterial', '720kb.tooltips'])
      .controller('AppCtrl', function($scope, $mdDialog) {
        $scope.status = '  ';

        $scope.showAlert = function(ev) {
          // Appending dialog to document.body to cover sidenav in docs app
          // Modal dialogs should fully cover application
          // to prevent interaction outside of dialog
          $mdDialog.show(
            $mdDialog.alert()
              .parent(angular.element(document.querySelector('#popupContainer')))
              .clickOutsideToClose(true)
              .title('This is an alert title')
              .content('You can specify some description text in here.')
              .ariaLabel('Alert Dialog Demo')
              .ok('Got it!')
              .targetEvent(ev)
          );
        };
      })
    </script>
  </body>
</html>
